package com.example.demo.service;

import com.example.demo.dto.EmployeeDTO;
import com.example.demo.entity.Employees;
import com.example.demo.mapper.EmployeesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author PRE_38965
 */
@Service
public class EmployeesServiceImpl implements EmployeesService{
    @Autowired
    EmployeesMapper employeesMapper ;

    @Override
    public List<Employees> queryAll() {
        return employeesMapper.queryAll();
    }

    @Override
    public int addEmployees(Employees employeesid) {
        return employeesMapper.addEmployees(employeesid);
    }

    @Override
    public int delEmployees(int id) {
        return employeesMapper.delEmployees(id);
    }

    @Override
    public Integer updateEmployees(Employees employees) {
        return employeesMapper.updateEmployees(employees);
    }

    @Override
    public Employees queryAllById(Integer employeesid) {
        return employeesMapper.queryAllById(employeesid);
    }

    @Override
    public Employees getEmployeeWithLeader(EmployeeDTO employeeDTO) {
        System.out.println("serviceImlp");
        return employeesMapper.getEmployeeWithLeader(employeeDTO);
    }
}
